import request from '@/utils/request'

export default {
  getAllBanner() {
    return request({
      url: `/weddingadmin/banner/getAll`,
      method: 'get'
    })
  },

  getBannerPageVo(current, limit) {
    return request({
      url: `/weddingadmin/banner/getBannerPageVo/${current}/${limit}`,
      method: 'get',
    })
  },

  getBannerPageQueryVo(current, limit, bannerQuery){
    return request({
        url: `/weddingadmin/banner/getBannerPageQuery/${current}/${limit}`,
        method: 'post',
        data: bannerQuery  //转化json传递
      })
  },

  deleteAllSelect(ids) {
    return request({
        url: `/weddingadmin/banner/deleteAllSelect`,
        method: 'delete',
        data: ids
    })
  },

  getOneById(id) {
    return request({
        url: `/weddingadmin/banner/getOneById/${id}`,
        method: 'get',
    })
  },
  
  deleteOneById(id) {
    return request({
        url: `/weddingadmin/banner/deleteOneById/${id}`,
        method: 'delete',
    })
  },

  searchByName(bannerName) {
    return request({
        url: `/weddingadmin/banner/searchByName/${bannerName}`,
        method: 'get',
    })
  },

  saveOrUpdate(banner) {
    return request({
        url: `/weddingadmin/banner/saveOrUpdate`,
        method: 'post',
        data: banner,
    })
  },
}
